package com.wanxi.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Li
 * @Date 2023/5/4 15:13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel(value = "客户",description = "描述客户对象")
@TableName("customers")
public class CustomerModel {
    @TableId(value = "id", type = IdType.ASSIGN_ID)//雪花算法
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "客户id",example = "1678239961299619841")
    private Long id;
    @ApiModelProperty(value = "客户姓名",example = "张三")
    private String name;
    @ApiModelProperty(value = "年龄",example = "35")
    private Integer age;
    @ApiModelProperty(value = "电话",example = "13687958961")
    private String phone;
    @ApiModelProperty(value = "性别",example = "男")
    private String sex;
    @ApiModelProperty(value = "住址",example = "成都市高新区幸福小区5栋8-2号")
    private String address;
    @ApiModelProperty(value = "邮箱",example = "55s@qq.com")
    private String email;
    @ApiModelProperty(value = "创建时间",example = "2023-05-17 11:19:07")
    private String createTime;
    @ApiModelProperty(value = "修改时间",example = "2023-05-19 11:19:07")
    private String updateTime;
    @ApiModelProperty(value = "状态",example = "1")
    private Integer enable;
    @ApiModelProperty(value = "备注",example = "vip客户")
    private String remark;
    @ApiModelProperty(value = "搜索起始年龄",example = "20")
    @TableField(exist = false)
    private Integer startAge;
    @ApiModelProperty(value = "搜索终止年龄",example = "50")
    @TableField(exist = false)
    private Integer endAge;
    @ApiModelProperty(value = "页数",example = "1")
    @TableField(exist = false)
    private Integer page; //页数
    @ApiModelProperty(value = "每页条数",example = "10")
    @TableField(exist = false)
    private Integer limit; //条数
}
